@import "ui-variables";

atom-notifications:empty {
  pointer-events: none
}

atom-text-editor[with-minimap] {
  display: flex;

  .editor--private {
    order: 2;
    flex: 1 0 90%;
    width: 90%;
  }
}

atom-text-editor, html {
  atom-text-editor-minimap {
    display: block;
    overflow: hidden;
    position: relative;
    -webkit-user-select: none;

    &:not([stand-alone]) {
      height: 100%;
      order: 3;
      width: 10%;
      flex: 0 0 10%;

      &.left {
        order: 1;
        position: absolute;
      }
    }

    &.absolute {
      position: absolute;
      right: 0;

      &.adjust-absolute-height {
        pointer-events: none;

        canvas, .minimap-visible-area {
          pointer-events: auto;
        }
      }

      // absolute mode do nothing when the minimap is on the left, because
      // it would conflict with the editor's gutter
      &.left {
        right: initial;
      }

      .open-minimap-quick-settings {
        right: 16px;
      }
    }

    canvas {
      position: absolute;
      top: 0;
      left: 0;
      transform-origin: 0 0;
    }

    .minimap-visible-area {
      position: absolute;
      display: block;
      cursor: -webkit-grab;

      border-left: 0px solid rgba(127, 127, 127, 0.1);

      &:active {
        cursor: -webkit-grabbing;
      }

      &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(127, 127, 127, 0.2);
      }
    }

    .minimap-controls {
      position: relative;
      height: 100%;
      pointer-events: none;
    }

    .minimap-scroll-indicator {
      position: absolute;
      display: block;
      right: 0;
      width: 2px;
      min-height: 2px;
      z-index: 10;
      background: @background-color-selected;
    }

    .open-minimap-quick-settings {
      opacity: 0;
      position: absolute;
      z-index: 1;
      cursor: pointer;
      pointer-events: auto;
      color: @text-color;
      font-size: 20px;
      text-align: center;
      line-height: 24px;
      width: 24px;
      height: 24px;
      display: block;
      right: 8px;
      transition: opacity 0.4s;

      &:before {
        content: '\f02f';
        font-family: 'Octicons Regular';
      }
    }
    &:hover .open-minimap-quick-settings {
      opacity: 1;
      transition: opacity 0.1s;
    }
  }
}

minimap-quick-settings {
  position: absolute !important;
  z-index: 5;

  .hidden-input {
    position: absolute;
    width: 0;
    height: 0;
    background: transparent;
    border: none;
  }

  ol {
    margin-top: 0 !important;

    .separator {
      background: @background-color-highlight;
      height: 1px;

      &:first-child {
        display: none;
      }
    }

    li:hover {
      background: @background-color-highlight;
    }
  }

  .select-list.popover-list ol.list-group {
    overflow: visible;
    max-height: none;
  }

  .btn-group {
    width: 100%;

    .btn {
      width: 50%;
    }
  }
}
